package com.learning.spring.security.base.config;

import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.annotation.Bean;
import org.springframework.security.authorization.AuthorizationEventPublisher;
import org.springframework.security.authorization.SpringAuthorizationEventPublisher;

/**
 * ClassName: AuthorizationEvent
 * Description:
 * Date: 2022/7/12 10:31
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class AuthorizationEventConfiguration {

    @Bean
    public AuthorizationEventPublisher authorizationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
        return new SpringAuthorizationEventPublisher(applicationEventPublisher);
    }
}
